package pro.shushi.pamirs.framework.faas.enmu;

import pro.shushi.pamirs.meta.annotation.Errors;
import pro.shushi.pamirs.meta.common.enmu.ExpBaseEnum;
import pro.shushi.pamirs.meta.common.enmu.IEnum;

@Errors(displayName = "系统函数错误枚举")
public enum FaasExpEnumerate implements ExpBaseEnum, IEnum<Integer> {

    SYSTEM_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008000, "系统异常"),
    BASE_NO_PROVIDERS_FOR_METHOD_ERROR(ERROR_TYPE.REMOTE_ERROR, 10008001, "没有方法的提供者"),
    BASE_ROUTER_ERROR(ERROR_TYPE.REMOTE_ERROR, 10008002, "ROUTER路由错误"),
    BASE_CLASS_NOT_FOUNT_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008003, "本地调用找不到指定的类"),
    BASE_ILLEGAL_ACCESS_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008004, "非法权限"),
    BASE_INSTANTIATION_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008005, "实例化类失败"),
    BASE_INVOCATION_TARGET_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008006, "系统正忙，请稍后再试"),
    BASE_JAVASCRIPT_EVAL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008007, "JAVASCRIPT计算失败"),
    BASE_JAVASCRIPT_RUN_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008008, "JAVASCRIPT运行失败"),
    BASE_SCRIPT_INVOKE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008009, "脚本执行错误"),
    BASE_EXPRESSION_WRONG_ARGUMENT_LENGTH_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008010, "参数长度错误"),
    BASE_EXPRESSION_NOT_EXIST_FUN_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008011, "函数不存在"),
    BASE_FUN_NOT_EXIST_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008012, "函数不存在"),
    BASE_DEPLOY_NO_AUTH_TO_CALL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008013, "表达式不支持该内置函数"),
    BASE_LOCAL_CALLER_UNKNOWN_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008014, "未知异常"),
    BASE_CLASS_MAKE_UTILS_UNKNOW_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008015, "系统异常"),
    BASE_DSL_RUN_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008016, "逻辑计算错误"),
    BASE_SCRIPT_SYNTAX_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008017, "脚本语法错误"),
    BASE_FUNCTION_IS_NOT_EXIST_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008018, "函数不存在"),
    BASE_ARGUMENT_NUM_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008019, "参数个数不对"),
    BASE_FUNCTION_INSTANCE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008020, "函数初始化错误"),
    BASE_SCRIPT_CACHE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008021, "脚本缓存错误"),
    BASE_FUNCTION_MANAGEMENT_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008022, "函数执行错误"),
    BASE_FUNCTION_MANAGEMENT2_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008023, "函数执行错误"),
    BASE_FUNCTION_MANAGEMENT3_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008024, "函数执行错误"),
    BASE_FUNCTION_MANAGEMENT4_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008025, "函数执行错误"),
    BASE_EXPRESSION_FIELD_IS_NOT_EXIST_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008026, "表达式执行错误，字段配置不存在"),
    BASE_SERVICE_PUBLISH_MODULE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008027, "未依赖发布服务的实现类所在jar包"),
    BASE_VALIDATE_EXPRESSION_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008028, "校验表达式配置错误"),
    BASE_EXPRESSION_PARAM_IS_NULL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008029, "表达式入参为空"),
    BASE_VALIDATION_FAIL_ERROR(ERROR_TYPE.DATA_ERROR, 10008030, "校验失败"),
    BASE_EXPRESSION_EXECUTE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008031, "表达式执行失败"),
    BASE_FUNCTION_MANAGEMENT5_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10008032, "构造函数执行错误");

    private final ERROR_TYPE type;

    private final int code;

    private final String msg;

    FaasExpEnumerate(ERROR_TYPE type, int code, String msg) {
        this.type = type;
        this.code = code;
        this.msg = msg;
    }
}
